﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using mars_client.csharp.model.vo;
using mars_client.gui.window;

namespace mars_client.csharp.ao.impl
{
    class UserInfoImpl : UserInfoAO
    {
        private UserInfoImpl() { }
        private readonly static UserInfoImpl instance = new UserInfoImpl();
        internal static UserInfoImpl Instance
        {
            get
            {
                return instance;
            }
        }
        public void showUserInfo(UserVO userVO)
        {
            App.Current.Dispatcher.Invoke(() =>
            {
                UserInfoWindow uiw = new UserInfoWindow();
                uiw.nickName.Text = userVO.nickName;
                uiw.username1.Content = userVO.nickName;
                uiw.sex.Text = userVO.sex == 1 ? "男" : "女";
                uiw.intro.Text = userVO.userIntro;
                uiw.ShowDialog();
            });
            
        }
    }
}
